package com.kakarote.hrm.mapper;

import com.kakarote.core.entity.BasePage;
import com.kakarote.core.servlet.BaseMapper;
import com.kakarote.hrm.entity.BO.QueryRecruitPlanPageListBO;
import com.kakarote.hrm.entity.PO.HrmRecruitPlan;
import com.kakarote.hrm.entity.VO.RecruitPlanVO;
import com.kakarote.hrm.entity.VO.SyncRecruitPlanVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * <p>
 * 招聘计划表 Mapper 接口
 * </p>
 *
 * @author system
 * @since 2024-01-01
 */
public interface HrmRecruitPlanMapper extends BaseMapper<HrmRecruitPlan> {

    /**
     * 根据计划id查询计划详情
     *
     * @param planId 计划id
     * @return 计划详情
     */
    RecruitPlanVO queryById(Long planId);

    /**
     * 分页查询招聘计划列表
     *
     * @param parse 分页参数
     * @param queryRecruitPlanPageListBO 查询条件
     * @return 分页结果
     */
    BasePage<RecruitPlanVO> queryRecruitPlanPageList(BasePage<RecruitPlanVO> parse, 
                                                     @Param("data") QueryRecruitPlanPageListBO queryRecruitPlanPageListBO);

    /**
     * 更新招聘计划
     *
     * @param recruitPlan 招聘计划
     */
    void setRecruitPlan(HrmRecruitPlan recruitPlan);

    /**
     * 查询所有符合条件的招聘计划列表（不分页）
     *
     * @param queryRecruitPlanPageListBO 查询条件
     * @return 招聘计划列表
     */
    List<RecruitPlanVO> queryAllRecruitPlanList(@Param("data") QueryRecruitPlanPageListBO queryRecruitPlanPageListBO);

    /**
     * 查询需要同步的招聘计划列表
     *
     * @return 招聘计划同步数据列表
     */
    SyncRecruitPlanVO selectSyncRecruitPlan(@Param("planId") Long planId);
}
